﻿using Mari.SmartHotel.Core;
using Microsoft.Services.Clab.UI.Mvvmc;
using Microsoft.Services.Clab.UI.Mvvmc.Presentation;

namespace Mari.SmartHotel.Shell
{
    public class ShellViewModel : SHViewModelBase
    {
        #region MainView reference
        public ShellView MainView { get { return base.Views.MainView as ShellView; } }
        #endregion

        #region ViewModel Initialization
        protected override IView CreateView()
        {
            return new ShellView();
        }

        protected override void CacheMetadata(WpfViewModelMetadata metadata)
        {
            base.CacheMetadata(metadata);
            metadata.DefineProperty(new ViewModelProperty("FocusedChildController"));
        }
        #endregion

        #region Properties

        public ControllerCollection ChildControllers { get { return this.Controller.ChildControllers; } }


        #region FocusedChildController ViewModel Property
        public IController FocusedChildController
        {
            get { return base.GetValue<IController>("FocusedChildController"); }
            set { base.SetValue<IController>("FocusedChildController", value); }
        }
        #endregion

        #endregion
    }
}